<template>
	<view class="content">
		<view class="box">
			<view class="title">
			{{title}}
				</view>
				<view class="content1" v-html="content">
					
				</view>
				<view class="author">
					{{author}}
				</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'',
				content:'',
				author:'',
				id:''
			}
		},
		onLoad() {
			this.getinfo()
		},
		methods: {
			getinfo(){
				let pages = getCurrentPages();
				   let curPage = pages[pages.length-1];
										console.log(curPage.options.id)
				
					uni.getStorage({
						key:'token',
						success:(ress)=>{
							this.token = ress.data
							this.http({
								url:'/api/Page/noticeMessage',
								method:'POST',
								header:{
									"content-type": "application/x-www-form-urlencoded",
									token:this.token
								},
								data:{
									id:curPage.options.id
								},
								success:(res)=>{
									// console.log(res.data)
									this.title=res.data.title;
									this.content=res.data.content;
									this.author=res.data.author	
								}
							})
						}
					})
				
				
			}
		}
	}
</script>

<style lang="scss">
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		font-family: PingFang SC;
		font-weight: 500;
		color:#2b2b2b;
		padding-bottom: 50rpx;
		.box{
			width: 690rpx;
			margin-top: 20rpx auto;
			.title{
				text-align: center;
				font-size: 30rpx;
				font-weight: 700;
			}
			.content1{
				font-size: 24rpx;
			}
			.author{
				text-align: right;
			}
		}
		
	}

	
</style>
